home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
etc
/
RCS
/
stty.c,v
< prev
next >
Wrap
Text File
|
1988-12-31
|
3KB
|
143 lines
head 1.3;
branch ;
access ;
symbols ;
locks ; strict;
comment @ * @;
1.3
date 88.12.31.12.26.15; author ouster; state Exp;
branches ;
next 1.2;
1.2
date 88.07.29.17.40.56; author ouster; state Exp;
branches ;
next 1.1;
1.1
date 88.06.19.14.32.06; author ouster; state Exp;
branches ;
next ;
desc
@@
1.3
log
@Simplify so as not to need compatibility routines or Sprite kernel calls.
@
text
@/*
* stty.c --
*
* Soruce for stty procedure.
*
* Copyright 1986 Regents of the University of California
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies. The University of California
* makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without
* express or implied warranty.
*/
#ifndef lint
static char rcsid[] = "$Header: /sprite/src/lib/c/etc/RCS/stty.c,v 1.2 88/07/29 17:40:56 ouster Exp Locker: ouster $ SPRITE (Berkeley)";
#endif not lint
#include <sgtty.h>
/*
*----------------------------------------------------------------------
*
* stty --
*
* Set terminal characteristics.
*
* Results:
* 0 is normally returned. If an error occurred, -1 is returned
* and errno give details.
*
* Side effects:
* The terminal characterstics are modified according to buf.
*
*----------------------------------------------------------------------
*/
int
stty(fd, buf)
int fd; /* File descriptor */
struct sgttyb *buf; /* buffer that holds tty info */
{
return ioctl(fd, TIOCSETP, buf);
}
@
1.2
log
@Lint.
@
text
@d2 1
a2 1
* gtty.c --
d4 1
a4 1
* Procedure to map from Unix gtty system call to Sprite.
d7 7
a13 1
* All rights reserved.
d17 1
a17 1
static char rcsid[] = "$Header: stty.c,v 1.1 88/06/19 14:32:06 ouster Exp $ SPRITE (Berkeley)";
d20 1
a20 4
#include <sprite.h>
#include "compatInt.h"
#include <dev/tty.h>
d27 1
a27 1
* Procedure to simulate Unix stty call.
d30 2
a31 2
* UNIX_ERROR is returned upon error, with the actual error code
* stored in errno. UNIX_SUCCESS is returned on success.
d34 1
a34 1
* None.
d45 1
a45 10
ReturnStatus status;
status = Fs_IOControl(fd, IOC_TTY_SETP, sizeof(struct sgttyb),
(Address) buf, 0, (Address) NULL);
if (status != SUCCESS) {
errno = Compat_MapCode(status);
return(UNIX_ERROR);
}
return(UNIX_SUCCESS);
@
1.1
log
@Initial revision
@
text
@d11 1
a11 1
static char rcsid[] = "$Header: stty.c,v 1.2 87/06/25 10:38:59 ouster Exp $ SPRITE (Berkeley)";
d45 1
a45 1
(Address) buf, 0, NULL);
@